package com.atguigu.yygh.hosp.controller;

import com.atguigu.yygh.common.R;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zhmwi
 * @Date 2021/7/3
 * @Dersciption
 */
@RestController
@RequestMapping("/user")
public class LoginController {

    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("/info")
    public R info(){
        return R.ok()
                .data("roles","[admin]")
                .data("name","admin")
                .data("avatar","");
    }

    @PostMapping("logout")
    public R logout(){
        return R.ok();
    }
}
